<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WiFi Logger component: utils.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">WiFi Logger component
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">WiFi Logger component, uses wifi to output logs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">utils.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="utils_8h_source.html">utils.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for utils.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="utils_8cpp__incl.png" border="0" usemap="#utils_8cpp" alt=""/></div>
<map name="utils_8cpp" id="utils_8cpp">
<area shape="rect" id="node2" href="utils_8h.html" title="utils.h" alt="" coords="12,80,69,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afc9368ed632b09b72ddca76dd00e340a"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#afc9368ed632b09b72ddca76dd00e340a">generate_log_message_timestamp</a> (uint log_level, uint32_t timestamp, char *log_message)</td></tr>
<tr class="memdesc:afc9368ed632b09b72ddca76dd00e340a"><td class="mdescLeft">&#160;</td><td class="mdescRight">adds timestamp to the log message  <a href="#afc9368ed632b09b72ddca76dd00e340a">More...</a><br /></td></tr>
<tr class="separator:afc9368ed632b09b72ddca76dd00e340a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:aac87591d2175e4b9f37c081b4a049a2b"><td class="memItemLeft" align="right" valign="top">const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#aac87591d2175e4b9f37c081b4a049a2b">log_level_char</a> [5] = { 'E', 'W', 'I', 'D', 'V'}</td></tr>
<tr class="separator:aac87591d2175e4b9f37c081b4a049a2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ab2adeadf2b5fc270090a941450fa3f"><td class="memItemLeft" align="right" valign="top">const char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html#a1ab2adeadf2b5fc270090a941450fa3f">log_level_color</a> [5][7] = {&quot;\e[31m&quot;, &quot;\e[33m&quot;, &quot;\e[32m&quot;, &quot;\e[39m&quot;, &quot;\e[39m&quot;}</td></tr>
<tr class="separator:a1ab2adeadf2b5fc270090a941450fa3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="afc9368ed632b09b72ddca76dd00e340a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc9368ed632b09b72ddca76dd00e340a">&#9670;&nbsp;</a></span>generate_log_message_timestamp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* generate_log_message_timestamp </td>
          <td>(</td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>log_level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>timestamp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>log_message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>adds timestamp to the log message </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">log_level</td><td>log level of the log message </td></tr>
    <tr><td class="paramname">timestamp</td><td>timestamp provided by ESP in milliseconds </td></tr>
    <tr><td class="paramname">log_message</td><td>log message to be sent through wifi </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>char* final log message with timestamp </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="aac87591d2175e4b9f37c081b4a049a2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac87591d2175e4b9f37c081b4a049a2b">&#9670;&nbsp;</a></span>log_level_char</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char log_level_char[5] = { 'E', 'W', 'I', 'D', 'V'}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1ab2adeadf2b5fc270090a941450fa3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ab2adeadf2b5fc270090a941450fa3f">&#9670;&nbsp;</a></span>log_level_color</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char log_level_color[5][7] = {&quot;\e[31m&quot;, &quot;\e[33m&quot;, &quot;\e[32m&quot;, &quot;\e[39m&quot;, &quot;\e[39m&quot;}</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
